Skip to content

Added solutoin for Project Euler problem 125 #2988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

ksr1122
Copy link
Contributor

@ksr1122 ksr1122 commented Oct 7, 2020

Name: Palindromic sums

The palindromic number 595 is interesting because it can be written as
the sum of consecutive squares: 6^2 + 7^2 + 8^2 + 9^2 + 10^2 + 11^2 + 12^2.
There are exactly eleven palindromes below one-thousand that can be written as
consecutive square sums, and the sum of these palindromes is 4164.

Note that 1 = 0^2 + 1^2 has not been included as this problem is concerned with
the squares of positive integers.

Find the sum of all the numbers less than 10^8
that are both palindromic and can be written as the sum of consecutive squares.

Reference: https://projecteuler.net/problem=125

Fixes: #2695

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

@ksr1122 ksr1122 force-pushed the problem_125 branch 3 times, most recently from 8f9dfd3 to a944404 Compare October 8, 2020 20:59
Name: Palindromic sums

The palindromic number 595 is interesting because it can be written as
the sum of consecutive squares: 6^2 + 7^2 + 8^2 + 9^2 + 10^2 + 11^2 + 12^2.
There are exactly eleven palindromes below one-thousand that can be written as
consecutive square sums, and the sum of these palindromes is 4164.

Note that 1 = 0^2 + 1^2 has not been included as this problem is concerned with
the squares of positive integers.

Find the sum of all the numbers less than 10^8
that are both palindromic and can be written as the sum of consecutive squares.

Reference: https://projecteuler.net/problem=125

Fixes: TheAlgorithms#2695
@ksr1122 ksr1122 changed the title problem_125: project euler solution 125 Hacktoberfest: project euler solution 125 Oct 9, 2020
@ksr1122 ksr1122 closed this Oct 10, 2020
@ksr1122 ksr1122 changed the title Hacktoberfest: project euler solution 125 Added solutoin for Project Euler problem 125 Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more solutions to Project Euler problems
1 participant